#include "CommonOperation.h"
#include "Message.h"
#include <iostream>

using namespace std;

typedef enum {
	func1Type = 1,
	func2Type
}OptType;

int func1(Message &msg){
	cout << "func1...\n";
	return 0;
}

int func2(Message &msg){
	cout << "func2...\n";
	return 0;
}

int main()
{
	CommonOperation codeMethod;
	codeMethod.addMethodToList(string("test"),func1Type,func1);
	codeMethod.addMethodToList(string("test"),func2Type,func2);

	Message msg;
	msg.set(Message::HMC_ATTRIBUTE_NAME,"test");
	msg.setType(func1Type);

	codeMethod.execute(msg);
	
	msg.setType(func2Type);
	codeMethod.execute(msg);

	return 0;
}

